﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileMaritalProcessAdmin.ascx.cs" 
Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileMaritalProcessAdmin" %>

<script src="../../../App_Common/Resources/Scripts/jQuery.js" type="text/javascript"></script>

<owc:OwGrid ID="HomeProfileMaritalProcessGrid" runat="server" SkinID="OwGridAdmin"
    DataSourceID="HomeProfileMaritalProcessOds" OwEnableMessageDisplay="True" 
    OwMessageDisplayControl="" OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="HomeProfileMaritalProcessOds" DataKeyNames="OpenHomeProfileMaritalProcessID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>" RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileMaritalProcessID") %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b>
                                    <%# (OwEnum.MaritalStatus)(Eval("MaritalStatusID").OwToInt64TryParseReturn0())%>
                                </b></a>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="ProfileDetailOwR" runat="Server" OwText="ProfileDetailLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwOpenHomeProfileDetailsBLL.OwGetEntity(Eval("OpenHomeProfileDetailID").OwToInt64TryParseReturn0()).Title.OwGetLeft(100, true)%>
                            </td>
                        </tr>
                        <tr>
                            <td>                                
                                <owc:OwR ID="DateTimeStartOwR" runat="Server" OwText="DateTimeStartLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateTimeStart").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeEndOwR" runat="Server" OwText="DateTimeEndLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateTimeEnd").OwToDateTimePublishDate() %>
                            </td>
                        </tr>                       
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>                                
                                <owc:OwR ID="LanguageOwR" runat="server" OwText="Language" OwSuffix=":" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode") %>
                            </td>
                        </tr>                        
                        <tr>
                            <td>
                                <owc:OwR ID="NumberOfChildrenOwR" runat="Server" OwText="NumberOfChildrenLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("NumberOfChildren")%>
                            </td>
                        </tr>                        
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table>                        
                        <tr>
                            <td>
                                <%--<asp:Literal ID="DeletedLabel" runat="server" Text="<%$ OwR: Delete%>" />:--%>
                                <owc:OwR ID="DeletedOwR" runat="server" OwText="DeleteLabel" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Eval("IsDeleted")%>' Text='<%# Eval("OpenHomeProfileMaritalProcessID") %>'
                                    CssClass="HiddenText" OnCheckedChanged="IsDeletedCheckBox_CheckedChanged" AutoPostBack="true" />                            
                            </td>
                        </tr>                        
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/HomeProfileMaritalProcessEdit.aspx?id=<%#Eval("OpenHomeProfileMaritalProcessID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%--<a id="linkDelete" runat="server" href="#" title="Confirm delete" >
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif' runat="server"
                            id="DeleteImage" alt='<%$ OwR:DeleteCommandLabel %>' />
                    </a>--%>
                    <asp:ImageButton CausesValidation="true" onClientClick='if(!confirm("Are you sure to  Delete?")) return false' ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton" ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    <%--<owc:OwConfirmButton ID="EditDeleteButton" runat="server" CausesValidation="True"
                        CommandName="Delete" Image-EnableImageButton="true" Image-ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" Text="<%$OwR:Delete %>" SkinID="OwConfirmButton">
                        <Icon  PrimaryIconUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </owc:OwConfirmButton>--%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</owc:OwGrid>
<%--<owc:OwObjectDataSource ID="OwObjectDataSource1" runat="server" 
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileMaritalProcessEntity" 
    DeleteMethod="OwDelete" InsertMethod="OwInsert" 
    OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic" 
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileMaritalProcessBLL" 
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter Name="religionID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>--%>

<owc:OwObjectDataSource ID="HomeProfileMaritalProcessOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileMaritalProcessEntity"
    DeleteMethod="OwDelete" OldValuesParameterFormatString="original_{0}" SelectMethod="OwGetByDynamic" EnablePaging="true" SelectCountMethod="OwGetByDynamicCount"
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileMaritalProcessBLL" 
    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean"  DefaultValue="false" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="maritalStatusID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="numberOfChildren" Type="Int32" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>